package lumis.portal.serialization.operation;

import lumis.portal.authentication.SessionConfig;
import lumis.util.ITransaction;

/**
 * Checks if a foreign key matches an already persisted object
 *
 * @version $Revision: 5769 $ $Date: 2007-02-01 12:00:07 -0200 (Thu, 01 Feb 2007) $
 * @since 4.0.9
 */
public interface IConfigKeyChecker
{
	/**
	 * Checks if configId matches an already persisted object
	 * 
	 * @param sessionConfig
	 * @param configKey
	 * @param config Optional, allows a checker to read aditional fields to check composed keys
	 * @param transaction
	 * @return true if configId matches an already persisted object
	 */
	public boolean keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction);
}
